@echo off


REM    ------ set these paths as necessary -------

set _acml32=C:\Programs\AMD\ACML 4.0.0\32-bit
set _acml64=C:\Programs\AMD\ACML 4.0.0\64-bit

REM    -------------------------------------------





if NOT EXIST "%_acml32%" (
echo Please edit this batch file so that the _acml32 variable points to your 32-bit IFORT ACML installation
pause
exit /B
)

if NOT EXIST "%_acml64%" (
echo Please edit this batch file so that the _acml64 variable points to your 64-bit IFORT ACML installation
pause
exit /B
)


if NOT EXIST "%NMLI_PATH%\src\Nmli.sln" (
echo The environment variable NMLI_PATH must be set to your NMLI directory.
pause
exit /B
)

set _nmli32acml=%NMLI_PATH%\bin\x86\ACML
set _nmli64acml=%NMLI_PATH%\bin\x64\ACML


echo.
echo.
echo This batch will setup 32-bit and 64-bit ACML
echo  for use with NMLI on Windows XP x64
echo.
echo The ACML libraries will be placed in
echo       %_nmli32acml%
echo  and  %_nmli64acml%
echo.
pause

echo.
md "%_nmli32acml%"
md "%_nmli64acml%"
echo.

IF %NUMBER_OF_PROCESSORS% == 1 (
echo  This machine has only one processor, so we're installing the single processor versions...
copy /y "%_acml32%\ifort32\lib\*.dll" "%_nmli32acml%"
copy /y "%_acml64%\ifort64\lib\*.dll" "%_nmli64acml%"
) ELSE (
echo  This machine has more than one processor, so we're installing the multi-processor versions...
copy /y "%_acml32%\ifort32_mp\lib\*.dll" "%_nmli32acml%"
copy /y "%_acml64%\ifort64_mp\lib\*.dll" "%_nmli64acml%"
echo Standardizing nomenclature...
move "%_nmli32acml%\libacml_mp_dll.dll" "%_nmli32acml%\libacml_dll.dll"
move "%_nmli64acml%\libacml_mp_dll.dll" "%_nmli64acml%\libacml_dll.dll"
)
echo.
echo All done.
echo.
pause

